package com.travel.modules.review.entity;

import java.io.Serializable;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.travel.commons.validator.groups.AddGroup;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * null
 * @TableName review
 */
@Data
@TableName("review")
public class Review implements Serializable {
    /**
     *
     */
    @TableId
    private Integer id;
    @TableField(exist = false)
    private String orderId;

    /**
     * 用户id
     */
    private Integer userId;
    @TableField(exist = false)
    private String username;
    @TableField(exist = false)
    private String headUrl;

    /**
     * 商品id
     */
    @NotBlank(message = "商品id不能为空", groups = AddGroup.class)
    private String goodsId;

    /**
     * 满意度，0-不满意，1-一般，2-满意，3-非常满意
     */
    @NotNull(message = "满意度不能为空", groups = AddGroup.class)
    private Integer satisfaction;

    /**
     * 评论内容
     */
    @NotBlank(message = "评论内容不能为空", groups = AddGroup.class)
    private String content;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database table review
     */
    private static final long serialVersionUID = 1L;
}